import cv2

facer = cv2.CascadeClassifier("./lbpcascades/me_lbp_cascade.xml")
# facer = cv2.CascadeClassifier("./lbpcascades/lbpcascade_frontalface_improved.xml")
# facer = cv2.CascadeClassifier("./lbpcascades/lbpcascade_frontalface.xml")

girl = cv2.imread("../asset/girl.jpeg")
gray = cv2.cvtColor(girl, cv2.COLOR_BGR2GRAY)

faces = facer.detectMultiScale(gray, 1.1, 5)
print(faces)
for (x, y, w, h) in faces:
    cv2.rectangle(girl, (x, y), (x + w, y + h), (0, 0, 255), 2)

while True:
    cv2.imshow('girl', girl)
    key = cv2.waitKey(10)
    if key & 0xFF == ord('q'):
        break
cv2.destroyAllWindows()
